Testing C Programs for Vulnerability Using Trace-Based Symbolic Execution and Satisfiability Analysis
نویسندگان
چکیده
Security testing has gained significant attention recently due to the huge number of attacks against software systems. This paper presents a novel security testing method using trace-based symbolic execution and satisfiability analysis. It reuses test cases generated from traditional functional testing to produce execution traces. An execution trace is a sequence of program statements exercised by a test case. Each execution trace is symbolically executed to produce program constraints and security constraints. A program constraint is a constraint imposed by program logic on program variables. A security constraint is a condition on program variables that must be satisfied to ensure system security. A security vulnerability exists if there is an assignment of values to program variables that satisfies the program constraint but violates the security constraint. This assignment of values is used to generate test cases to uncover the security vulnerability. One novelty of this method is a test model that unifies program constraints and security constraints such that formal reasoning can be applied to detect vulnerabilities. Another novelty is attribute-based analysis that abstracts program variables and functions for effective and efficient symbolic execution. A tool named SecTAC has been implemented and applied to 14 benchmark programs and 3 moderate size open-source programs. The experiment shows that SecTAC quickly detects all reported vulnerabilities and 15 new ones that have not been detected previously. The merits of the proposed method are threefold. First, trace-based symbolic execution reduces the search space greatly as compared to conventional symbolic execution. Second, attribute-based analysis tracks more useful information about program variables and functions than previous methods, resulting in more effective detection of vulnerabilities. Third, it is efficient and effective as the experiment result indicates.
منابع مشابه
An Empirical Study of Path Feasibility Queries
In this paper we present a comparative study of path feasibility queries generated during path exploration based software engineering methods. Symbolic execution based methods are gaining importance in different aspects of software engineering e.g. proving properties about programs, test case generation, comparing different executions of programs. These methods use SMT solvers to check the sati...
متن کاملAutomatic Formal Verification for EPICS
We built an EPICS-based radiation therapy machine control program and are using it to treat patients at our hospital. To help ensure safety, the control program uses a restricted subset of EPICS constructs and programming techniques, and we developed several new automated formal verification tools for this subset. To check our control program, we built a Symbolic Interpeter that finds errors in...
متن کاملMathematical Execution: A Unified Approach for Testing Numerical Code
This paper presents Mathematical Execution (ME), a new, unifiedapproach for testing numerical code. The key idea is to (1) capturethe desired testing objective via a representing function and (2) trans-form the automated testing problem to the minimization problem ofthe representing function. The minimization problem is to be solvedvia mathematical optimization. The main...
متن کاملDemand-Driven Compositional Symbolic Execution
We discuss how to perform symbolic execution of large programs in a manner that is both compositional (hence more scalable) and demand-driven. Compositional symbolic execution means finding feasible interprocedural program paths by composing symbolic executions of feasible intraprocedural paths. By demand-driven, we mean that as few intraprocedural paths as possible are symbolically executed in...
متن کاملPractical Integer Overflow Prevention
Integer overflows in commodity software are a main source for software bugs, which can result in exploitable memory corruption vulnerabilities and may eventually contribute to powerful software based exploits, i.e., code reuse attacks (CRAs). In this paper, we present INTGUARD, a symbolic execution based tool that can repair integer overflows with high-quality source code repairs. Specifically,...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2009